Skip to content

Pagination component#739

Merged
BinaryMuse merged 24 commits intomajorfrom
mkt/pagination-component
Apr 1, 2020
Merged

Pagination component#739
BinaryMuse merged 24 commits intomajorfrom
mkt/pagination-component

Conversation

@BinaryMuse
Copy link
Copy Markdown
Contributor

@BinaryMuse BinaryMuse commented Mar 31, 2020

This PR adds a Pagination component.

image

Docs and demo: https://primer-components-git-mkt-pagination-component.primer.now.sh/components/Pagination

Closes #672

Targeting minor version release

Merge checklist

  • Added or updated TypeScript definitions (index.d.ts) if necessary
  • Added/updated tests
  • Added/updated documentation
  • Tested in Chrome
  • Tested in Firefox
  • Tested in Safari
  • Tested in Edge

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 31, 2020

This pull request is being automatically deployed with ZEIT Now (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://zeit.co/primer/primer-components/ouex6g9ao
✅ Preview: https://primer-components-git-mkt-pagination-component.primer.now.sh

@vercel vercel bot temporarily deployed to Preview April 1, 2020 17:50 Inactive
@vercel vercel bot temporarily deployed to Preview April 1, 2020 17:53 Inactive
@vercel vercel bot temporarily deployed to Preview April 1, 2020 19:04 Inactive
@vercel vercel bot temporarily deployed to Preview April 1, 2020 19:09 Inactive
@vercel vercel bot temporarily deployed to Preview April 1, 2020 19:23 Inactive
@vercel vercel bot temporarily deployed to Preview April 1, 2020 19:27 Inactive
@BinaryMuse BinaryMuse requested a review from emplums April 1, 2020 19:31
Thanks IE
@vercel vercel bot temporarily deployed to Preview April 1, 2020 20:24 Inactive
@vercel vercel bot temporarily deployed to Preview April 1, 2020 20:28 Inactive
Copy link
Copy Markdown

@emplums emplums left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is really awesome work 😍 I don't have any feedback, it looks like it's ready to go!

---
import State from '../components/State'

Use the pagination component to create a connected set of links that go to related pages (for example, previous, next, or page numbers).
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This docs page is above and beyond ✨ nice work!!

| showPages | Boolean | `true` | Whether or not to show the individual page links. |
| surroundingPageCount | Number | 2 | How many pages to display on each side of the currently selected page. |

## Theming
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a great idea to start doing! Would love to spend time refactoring the current components and creating more component-related objects in the theme, then start documenting that on each docs page

currentPage: number
hrefBuilder?: PaginationHrefBuilder
/**
* How many pages to show on the left and right of the component
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do these comments show up in VSCode when someone is writing TS? That's pretty sweet

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah they power TS intellisense IIRC

@vercel vercel bot temporarily deployed to Preview April 1, 2020 21:25 Inactive
@vercel vercel bot temporarily deployed to Preview April 1, 2020 21:27 Inactive
@vercel vercel bot temporarily deployed to Preview April 1, 2020 21:29 Inactive
@vercel vercel bot temporarily deployed to Preview April 1, 2020 21:32 Inactive
@emplums emplums mentioned this pull request Apr 1, 2020
8 tasks
@BinaryMuse BinaryMuse changed the base branch from master to major April 1, 2020 21:49
@vercel vercel bot temporarily deployed to Preview April 1, 2020 21:55 Inactive
@vercel vercel bot temporarily deployed to Preview April 1, 2020 22:04 Inactive
@vercel vercel bot temporarily deployed to Preview April 1, 2020 22:10 Inactive
@vercel vercel bot temporarily deployed to Preview April 1, 2020 22:17 Inactive
@BinaryMuse BinaryMuse merged commit 95acd04 into major Apr 1, 2020
@BinaryMuse BinaryMuse deleted the mkt/pagination-component branch April 1, 2020 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🔮 [New Component] Pagination

3 participants